#ifndef UIMESSAGECHATMODEL_H
#define UIMESSAGECHATMODEL_H

#include <QObject>

namespace IM_GUI_KIT {
    class UIMessageChatModel:public QObject
    {
        /**
        * userChat_Icon_img_src
        * chat_name
        * DataBody
        * mySend
        **/
        Q_OBJECT
        Q_PROPERTY(QString sessionid READ getSession WRITE setSession NOTIFY sessionChanged);
        Q_PROPERTY(QString chat_name READ getName WRITE setName NOTIFY nameChanged);
        Q_PROPERTY(QString msgBody READ getBody  WRITE setBody  NOTIFY bodyChanged);
        Q_PROPERTY(bool mySend READ getMySend NOTIFY mySendChanged );
        Q_PROPERTY(QString userChat_Icon_img_src READ getIcon WRITE setIcon NOTIFY iconChanged);
        Q_PROPERTY(QString timeNew READ getTime WRITE setTime NOTIFY timeChanged);
        Q_PROPERTY(int unread READ getUnread WRITE setUnread NOTIFY unreadChanged);
        Q_PROPERTY(QString msgid READ getMessageID );
    signals:
        void sessionChanged();
        void nameChanged();
        void bodyChanged();
        void iconChanged();
        void timeChanged();
        void unreadChanged();
        void mySendChanged();
    private:
        QString m_sessionId;
        QString m_name;
        QString m_icon;
        QString m_body;
        QString m_time;
        bool m_mysend;
        int m_unread;
        int64_t m_timestamp;
        int64_t m_seq;
        QString m_msgid;
        QString m_id;
    public:
        UIMessageChatModel(QObject *parent = nullptr);
        ~UIMessageChatModel();
        UIMessageChatModel(const QString sessionid,const QString &name,const QString &icon,const int64_t timestamp,const QString summary,int unRead,QObject *parent=nullptr);
        QString getSession()const;
        void setSession(const QString &sessionid);
        QString getName()const;
        void setName(const QString &name);
        QString getBody()const;
        void setBody(const QString &body);
        QString getIcon()const;
        void setIcon(const QString &icon);
        QString getTime()const;
        void setTime(const QString &timeNow);
        int getUnread();
        void setUnread(const int &unread);
        int getMySend();
        void setMySend(const  bool mysend);
        QString getMessageID() const;
        void setTimeStamp(const int64_t time);
        int64_t getTimeStamp();
        void setSeq(const int64_t seq);
        void setID(const QString &id);
        QString getID() const;
    };
}
#endif // UIMESSAGECHATMODEL_H
